#FROM ubuntu:latest
#MAINTAINER Silva Song "hanliuxin@cwddd.com"
#
##设置JDK环境变量
#RUN apt-get update
#RUN apt-get install -y wget
#ENV JAVA_HOME=/usr/local/jdk
#ENV PATH $JAVA_HOME/bin:$PATH
#
##安装tomcat
#RUN mkdir /var/tmp/tomcat
#RUN wget -P /var/tmp/tomcat http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.tar.gz
#RUN tar xzf /var/tmp/tomcat/apache-tomcat-8.5.31.tar.gz -C /var/tmp/tomcat
#RUN rm -rf /var/tmp/tomcat/apache-tomcat-8.5.31.tar.gz
#
##拷贝war到tomcat webapps目录
#COPY demo.war /var/tmp/tomcat/apache-tomcat-8.5.31/webapps
#
#EXPOSE 8080
##启动tomcat服务器
#CMD ["./var/tmp/tomcat/apache-tomcat-8.5.31/bin/startup.sh","run"]

FROM tomcat:8-jre8
MAINTAINER "hlx <hanliuxin@cwddd.com>"
#将war包添加进webapps中
ADD demo.war /usr/local/tomcat/webapps/
#启动tomcat shell执行程序
CMD ["catalina.sh", "run"]